package com.es.config;

import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.context.annotation.Configuration;

import com.es.listener.ESListener;

@Configuration
public class ListenerConfig {
	
	
	/**
	 * 注册 ESListener
	 * @return
	 */
	//@Bean
	public ServletListenerRegistrationBean<ESListener> esListener(){
		ServletListenerRegistrationBean<ESListener> servletListenerRegistrationBean = new ServletListenerRegistrationBean<ESListener>();
		servletListenerRegistrationBean.setListener(new ESListener());
		return servletListenerRegistrationBean;
	}
	
	
	

}
